package com.hyzh.latte.vehicle.dmo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hyzh.latte.vehicle.nezha.PoleVertex;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 杆子
 *
 * @author songkui
 * @since 2024/2/21 17:24
 */
@Data
@EqualsAndHashCode(of = {"id"})
@Accessors(chain = true)
@TableName("pole")
public class PolePGEntity {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    //杆子编码
    @TableField("pole_code")
    private String poleCode;

    //所属园区
    @TableField("park_code")
    private String parkCode;

    //杆子名称
    @TableField("pole_name")
    private String poleName;

    @TableField("road")
    private String road;

    //备注
    @TableField("remark")
    private String remark;

    @TableField("x_no")
    private String xNo;

    @TableField("y_no")
    private String yNo;


    @TableField("x_lon")
    private String xLon;

    @TableField("x_lat")
    private String xLat;

    @TableField("x_height")
    private String xHeight;

    @TableField("y_lon")
    private String yLon;

    @TableField("y_lat")
    private String yLat;

    @TableField("y_height")
    private String yHeight;


    public PoleVertex buildVertex() {
        PoleVertex vertex =  new PoleVertex();
        vertex.setParkCode(this.parkCode);
        vertex.setPoleCode(this.getPoleCode());
        vertex.setPoleName(this.getPoleName());
        return vertex;
    }

}
